package com.study.springcloud;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.websocket.server.PathParam;


/**
 * @Author raoluping
 * @Date 2017/10/26 11:41
 * @Description
 */
@RestController
public class HelloController {
  // 值在application 配置文件中设置
  @Value("${chaos.supreme}")
  private String str;

  @Value("${server.port}")
  String port;

  @RequestMapping("/sayHi")
  // http://localhost:2222/sayHi?name=22
  public String sayHi( @RequestParam String name) {
    return name + "say hi to " + str + ",i am from port:" + port;
  }
}
